package com.lafengmaker.admin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lafengmaker.admin.dao.UserDao;
import com.lafengmaker.admin.entity.User;
import com.lafengmaker.admin.service.UserService;

@Service
public class UserServiceImpl implements UserService  {
	@Autowired
	private UserDao userDao;


	public User userLonin(String username, String password) throws Exception {
		User q=new User();
		q.setUsername(username);
		q.setPassword(password);
		List<User> ul=this.userDao.queryByObject(q);
		return ul.get(0);
	}
	
}